package com.xyh.pojo;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import java.util.ArrayList;
import java.util.List;
@NoArgsConstructor
@AllArgsConstructor
@Data
public class Type {

    private Long id;
    @NotBlank(message = "分类名称不能为空")
    private String name;
    private String num;
    private List<Blog> blogs = new ArrayList<>();//一个类型对应多个博客

}
